<?php

namespace app\admin\controller;

class System extends AdminBase
{

    public function systemSetup()
    {
        return $this->fetch();
    }

    public function systemLog()
    {
        return $this->fetch();
    }

    public function fontIcon()
    {
        return $this->fetch();
    }

    public function glyphIcon()
    {
        return $this->fetch();
    }

    public function navMenu()
    {
        $menus = model('IndexMenu')->getAllmenus();
        $this->assign("menus", $menus);
        return $this->fetch();
    }

    public function addMenu()
    {
        $input = input();
        return model('IndexMenu')->addMenu($input);
    }

    public function delMenu()
    {
        $menuId = input('param.menuId');
        return model('IndexMenu')->delMenu($menuId);

    }

    public function editMenu()
    {
        $input = input();
        return model('IndexMenu')->editMenu($input);
    }

    public function getMenu()
    {
        $menuId = input('param.menu_id');

        return model('IndexMenu')->getMenu($menuId);
    }

    public function getTopMenus()
    {
        return model('IndexMenu')->getTopMenus();
    }
}
